package com.liuhouse1.controller;

import com.liuhouse1.pojo.Student;
import com.liuhouse1.service.StudentService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;

@Controller
public class StudentController {

    @Resource
    private StudentService studentService;

    @RequestMapping("/add_student")
    @ResponseBody
    public String addStudent(Student student){
        Integer num = studentService.addStudent(student);
        return "学生添加成功" + num;
    }

}
